package com.panda.pojo;


import com.google.common.base.Joiner;
import lombok.Data;

import java.io.Serializable;
import java.util.Set;

@Data
public class Service implements Serializable {

    private static final long serialVersionUID = 1L;

    private String name;

    private String body;

    private Set<String> dependencies;

    //服务所依赖的css和js文件
    private Set<String> css;
    private Set<String> js;

    @Override
    public String toString() {

        if (dependencies != null) {
            String ds = Joiner.on(",").join(dependencies);
            return "function(" + ds + ")\n" + body;
        } else {
            return "function()\n" + body;
        }


    }

}
